home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / ASM-SPAR.{_A / PSYCHO.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  20KB  |  401 lines

  1. /* $Id: psycho.h,v 1.4 1998/12/23 10:08:16 davem Exp $
  2.  * psycho.h: UltraSparc AX specific PCI definitions.
  3.  *
  4.  * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be)
  5.  */
  6.  
  7. #ifndef __SPARC64_PSYCHO_H
  8. #define __SPARC64_PSYCHO_H
  9.  
  10. #include <linux/types.h>
  11.  
  12. /* Ultra AX PSYCHO Register Set, one per controller probed. */
  13. struct psycho_regs {
  14. /*0x0000*/    u64    upa_id;        /* PSYCHO UPA Port ID Register    */
  15. /*0x0008*/    u64    upa_cfg;    /* PSYCHO UPA Config Register    */
  16. /*0x0010*/    u64    control;    /* PSYCHO Control Register    */
  17. /*0x0018*/    u64    __pad0;
  18. /*0x0020*/    u64    ecc_control;    /* ECC Control Register        */
  19. /*0x0028*/    u64    __pad1;
  20.  
  21.         /* Uncorrectable Error Fault Registers */
  22. /*0x0030*/    u64    ue_afsr;    /* UE Async Fault Status    */
  23. /*0x0038*/    u64    ue_afar;    /* UE Async Fault Address    */
  24.  
  25.         /* Correctable Error Fault Registers */
  26. /*0x0040*/    u64    ce_afsr;    /* CE Async Fault Status    */
  27. /*0x0048*/    u64    ce_afar;    /* CE Async Fault Address    */
  28.  
  29.         u64    __pad2[0x16];
  30.  
  31.         /* Performance Monitoring Registers */
  32. /*0x0100*/    u64    pmon_control;
  33. /*0x0108*/    u64    pmon_counter;
  34.  
  35.         u64    __pad3[0x1e];
  36.  
  37.         /* PCI Bus IOMMU lives here */
  38. /*0x0200*/    u64    iommu_control;    /* IOMMU Control        */
  39. /*0x0208*/    u64    iommu_tsbbase;    /* IOMMU TSB Base        */
  40. /*0x0210*/    u64    iommu_flush;    /* IOMMU Flush Register        */
  41.  
  42.         u64    __pad4[0x13d];
  43.  
  44.         /* Interrupt mapping/control registers */
  45. /*0x0c00*/    u64    imap_a_slot0;    /* PCI A Slot 0 Int Mapping    */
  46. /*0x0c08*/    u64    imap_a_slot1;    /* PCI A Slot 1 Int Mapping    */
  47. /*0x0c10*/    u64    imap_a_slot2;    /* PCI A Slot 2 Int Mapping (IIi only)*/
  48. /*0x0c18*/    u64    imap_a_slot3;    /* PCI A Slot 3 Int Mapping (IIi only)*/
  49.  
  50. /*0x0c20*/    u64    imap_b_slot0;    /* PCI B Slot 0 Int Mapping    */
  51. /*0x0c28*/    u64    imap_b_slot1;    /* PCI B Slot 1 Int Mapping    */
  52. /*0x0c30*/    u64    imap_b_slot2;    /* PCI B Slot 2 Int Mapping    */
  53. /*0x0c38*/    u64    imap_b_slot3;    /* PCI B Slot 3 Int Mapping    */
  54.  
  55.         u64    __pad6[0x78];
  56.  
  57. /*0x1000*/    u64    imap_scsi;    /* SCSI Int Mapping        */
  58. /*0x1008*/    u64    imap_eth;    /* Ethernet Int Mapping        */
  59. /*0x1010*/    u64    imap_bpp;    /* Parallel Port Int Mapping    */
  60. /*0x1018*/    u64    imap_au_rec;    /* Audio Record Int Mapping    */
  61. /*0x1020*/    u64    imap_au_play;    /* Audio Playback Int Mapping    */
  62. /*0x1028*/    u64    imap_pfail;    /* Power Fail Int Mapping    */
  63. /*0x1030*/    u64    imap_kms;    /* Kbd/Mouse/Ser Int Mapping    */
  64. /*0x1038*/    u64    imap_flpy;    /* Floppy Int Mapping        */
  65. /*0x1040*/    u64    imap_shw;    /* Spare HW Int Mapping        */
  66. /*0x1048*/    u64    imap_kbd;    /* Kbd Only Int Mapping        */
  67. /*0x1050*/    u64    imap_ms;    /* Mouse Only Int Mapping    */
  68. /*0x1058*/    u64    imap_ser;    /* Serial Only Int Mapping    */
  69. /*0x1060*/    u64    imap_tim0;    /* Timer 0 Int Mapping        */
  70. /*0x1068*/    u64    imap_tim1;    /* Timer 1 Int Mapping        */
  71. /*0x1070*/    u64    imap_ue;    /* UE Int Mapping        */
  72. /*0x1078*/    u64    imap_ce;    /* CE Int Mapping        */
  73. /*0x1080*/    u64    imap_a_err;    /* PCI A Err Int Mapping    */
  74. /*0x1088*/    u64    imap_b_err;    /* PCI B Err Int Mapping    */
  75. /*0x1090*/    u64    imap_pmgmt;    /* Power Mgmt Int Mapping    */
  76. /*0x1098*/    u64    imap_gfx;    /* OB Graphics Int Mapping    */
  77. /*0x10a0*/    u64    imap_eupa;    /* UPA Expansion Int Mapping    */
  78.  
  79.         u64    __pad7[0x6b];
  80.  
  81.         /* Interrupt Clear Registers */
  82. /*0x1400*/    u64    iclr_a_slot0[4];    /* PCI A Slot 0 Clear Int Reg */
  83. /*0x1420*/    u64    iclr_a_slot1[4];    /* PCI A Slot 1 Clear Int Reg */
  84. /*0x1440*/    u64    iclr_a_slot2[4];    /* PCI A Slot 2 Clear Int Reg */
  85. /*0x1460*/    u64    iclr_a_slot3[4];    /* PCI A Slot 3 Clear Int Reg */
  86.  
  87. /*0x1480*/    u64    iclr_b_slot0[4];    /* PCI B Slot 0 Clear Int Reg */
  88. /*0x14a0*/    u64    iclr_b_slot1[4];    /* PCI B Slot 1 Clear Int Reg */
  89. /*0x14c0*/    u64    iclr_b_slot2[4];    /* PCI B Slot 2 Clear Int Reg */
  90. /*0x14e0*/    u64    iclr_b_slot3[4];    /* PCI B Slot 3 Clear Int Reg */
  91.  
  92.         u64    __pad9[0x60];
  93.  
  94. /*0x1800*/    u64    iclr_scsi;
  95. /*0x1808*/    u64    iclr_eth;
  96. /*0x1810*/    u64    iclr_bpp;
  97. /*0x1818*/    u64    iclr_au_rec;
  98. /*0x1820*/    u64    iclr_au_play;
  99. /*0x1828*/    u64    iclr_pfail;
  100. /*0x1830*/    u64    iclr_kms;
  101. /*0x1838*/    u64    iclr_flpy;
  102. /*0x1840*/    u64    iclr_shw;
  103. /*0x1848*/    u64    iclr_kbd;
  104. /*0x1850*/    u64    iclr_ms;
  105. /*0x1858*/    u64    iclr_ser;
  106. /*0x1860*/    u64    iclr_tim0;
  107. /*0x1868*/    u64    iclr_tim1;
  108. /*0x1870*/    u64    iclr_ue;
  109. /*0x1878*/    u64    iclr_ce;
  110. /*0x1880*/    u64    iclr_a_err;
  111. /*0x1888*/    u64    iclr_b_err;
  112. /*0x1890*/    u64    iclr_pmgmt;
  113.  
  114.         u64    __pad10[0x2d];
  115.  
  116.         /* Interrupt Retry Timer. */
  117. /*0x1a00*/    u64    irq_retry;
  118.  
  119.         u64    __pad11[0x3f];
  120.  
  121.         /* Counters/Timers */
  122. /*0x1c00*/    u64    tim0_cnt;
  123. /*0x1c08*/    u64    tim0_lim;
  124. /*0x1c10*/    u64    tim1_cnt;
  125. /*0x1c18*/    u64    tim1_lim;
  126. /*0x1c20*/    u64    pci_dma_wsync;    /* PCI DMA Write Sync Register (IIi) */
  127.  
  128.         u64    __pad12[0x7b];
  129.  
  130.         /* PCI Bus A Registers */
  131. /*0x2000*/    u64    pci_a_control;    /* PCI Bus A Control Register    */
  132. /*0x2008*/    u64    __pad13;
  133. /*0x2010*/    u64    pci_a_afsr;    /* PCI Bus A Async Fault Status    */
  134. /*0x2018*/    u64    pci_a_afar;    /* PCI Bus A Async Fault Address*/
  135. /*0x2020*/    u64    pci_a_diag;    /* PCI Bus A Diag Register    */
  136. /*0x2028*/    u64    pci_tasr;    /* PCI Target Address Space Reg (IIi) */
  137.  
  138.         u64    __pad14[0xfa];
  139.  
  140.         /* PCI Bus A/IOMMU Streaming Buffer Registers */
  141. /*0x2800*/    u64    sbuf_a_control;    /* StrBuffer Control        */
  142. /*0x2808*/    u64    sbuf_a_pflush;    /* StrBuffer Page Flush        */
  143. /*0x2810*/    u64    sbuf_a_fsync;    /* StrBuffer Flush Sync Reg    */
  144.  
  145.         u64    __pad15[0x2fd];
  146.  
  147.         /* PCI Bus B Registers */
  148. /*0x4000*/    u64    pci_b_control;    /* PCI Bus B Control Register    */
  149. /*0x4008*/    u64    __pad16;
  150. /*0x4010*/    u64    pci_b_afsr;    /* PCI Bus B Async Fault Status    */
  151. /*0x4018*/    u64    pci_b_afar;    /* PCI Bus B Async Fault Address*/
  152. /*0x4020*/    u64    pci_b_diag;    /* PCI Bus B Diag Register    */
  153.  
  154.         u64    __pad17[0x7b];
  155.  
  156.         /* IOMMU diagnostic things */
  157. /*0x4400*/    u64    iommu_vdiag;    /* VADDR Diagnostic Register    */
  158. /*0x4408*/    u64    iommu_tcompare;    /* IOMMU TLB Tag Compare    */
  159.  
  160.         u64    __pad18[0x7e];
  161.  
  162.         /* PCI Bus B/IOMMU Streaming Buffer Registers */
  163. /*0x4800*/    u64    sbuf_b_control;    /* StrBuffer Control        */
  164. /*0x4808*/    u64    sbuf_b_pflush;    /* StrBuffer Page Flush        */
  165. /*0x4810*/    u64    sbuf_b_fsync;    /* StrBuffer Flush Sync Reg    */
  166.  
  167.         u64    __pad19[0xafd];
  168.  
  169.         /* DMA Scoreboard Diagnostic Registers */
  170. /*0xa000*/    u64    dscore_reg0;    /* DMA Scoreboard Diag Reg 0    */
  171. /*0xa008*/    u64    dscore_reg1;    /* DMA Scoreboard Diag Reg 1    */
  172.  
  173.         u64    __pad20[0x9e];
  174.  
  175.         /* More IOMMU diagnostic things */
  176. /*0xa500*/    u64    iommu_lru[16];    /* IOMMU LRU Queue Diag        */
  177. /*0xa580*/    u64    iommu_tag[16];    /* IOMMU TLB Tag Diag        */
  178. /*0xa600*/    u64    iommu_data[16];    /* IOMMU TLB Data RAM Diag    */
  179.  
  180.         u64    __pad21[0x30];
  181.  
  182.         /* Interrupt State Diagnostics */
  183. /*0xa800*/    u64    pci_istate;
  184. /*0xa808*/    u64    obio_istate;
  185.  
  186.         u64    __pad22[0xfe];
  187.  
  188.         /* Streaming Buffer A Diagnostic Area */
  189. /*0xb000*/    u64    sbuf_a_data[128]; /* StrBuffer Data Ram Diag    */
  190. /*0xb400*/    u64    sbuf_a_errs[128]; /* StrBuffer Error Status Diag*/
  191. /*0xb800*/    u64    sbuf_a_ptag[16]; /* StrBuffer Page Tag Diag    */
  192. /*0xb880*/    u64    __pad23[16];
  193. /*0xb900*/    u64    sbuf_a_ltag[16]; /* StrBuffer Line Tag Diag    */
  194.  
  195.         u64    __pad24[0xd0];
  196.  
  197.         /* Streaming Buffer B Diagnostic Area */
  198. /*0xc000*/    u64    sbuf_b_data[128]; /* StrBuffer Data Ram Diag    */
  199. /*0xc400*/    u64    sbuf_b_errs[128]; /* StrBuffer Error Status Diag*/
  200. /*0xc800*/    u64    sbuf_b_ptag[16]; /* StrBuffer Page Tag Diag    */
  201. /*0xc880*/    u64    __pad25[16];
  202. /*0xc900*/    u64    sbuf_b_ltag[16]; /* StrBuffer Line Tag Diag    */
  203. };
  204.  
  205. /* PSYCHO UPA Port ID */
  206. #define PSYCHO_UPPID_FESC    0xff00000000000000 /* FCode escape, 0xfc           */
  207. #define PSYCHO_UPPID_RESV1    0x00fffff800000000 /* Reserved                     */
  208. #define PSYCHO_UPPID_ENV    0x0000000400000000 /* Cannot generate ECC          */
  209. #define PSYCHO_UPPID_ORD    0x0000000200000000 /* One Outstanding Read         */
  210. #define PSYCHO_UPPID_RESV2    0x0000000180000000 /* Reserved                     */
  211. #define PSYCHO_UPPID_PDQ    0x000000007e000000 /* Data Queue size              */
  212. #define PSYCHO_UPPID_PRQ    0x0000000001e00000 /* Request Queue size           */
  213. #define PSYCHO_UPPID_UCAP    0x00000000001f0000 /* UPA Capabilities             */
  214. #define PSYCHO_UPPID_JEDEC    0x000000000000ffff /* JEDEC ID for PSYCHO          */
  215.  
  216. /* PSYCHO UPA Configuration Register */
  217. #define PSYCHO_UPCFG_RESV    0xffffffffffffff00 /* Reserved                     */
  218. #define PSYCHO_UPCFG_SCIQ1    0x00000000000000f0 /* Unused, always zero          */
  219. #define PSYCHO_UPCFG_SCIQ2    0x000000000000000f /* Requests Queue size 0x2        */
  220.  
  221. /* PSYCHO Control Register */
  222. #define PSYCHO_CONTROL_IMPL    0xf000000000000000 /* Implementation of this PSYCHO*/
  223. #define PSYCHO_CONTROL_VER    0x0f00000000000000 /* Version of this PSYCHO       */
  224. #define PSYCHO_CONTROL_MID    0x00f8000000000000 /* UPA Module ID of PSYCHO      */
  225. #define PSYCHO_CONTROL_IGN    0x0007c00000000000 /* Interrupt Group Number       */
  226. #define PSYCHO_CONTROL_RESV     0x00003ffffffffff0 /* Reserved                     */
  227. #define PSYCHO_CONTROL_APCKEN    0x0000000000000008 /* Address Parity Check Enable  */
  228. #define PSYCHO_CONTROL_APERR    0x0000000000000004 /* Incoming System Addr Parerr  */
  229. #define PSYCHO_CONTROL_IAP    0x0000000000000002 /* Invert UPA Parity            */
  230. #define PSYCHO_CONTROL_MODE    0x0000000000000001 /* PSYCHO clock mode            */
  231.  
  232. /* PSYCHO ECC Control Register */
  233. #define PSYCHO_ECNTRL_ECCEN    0x8000000000000000 /* Enable ECC Checking       */
  234. #define PSYCHO_ECNTRL_UEEN    0x4000000000000000 /* Enable UE Interrupts         */
  235. #define PSYCHO_ECNTRL_CEEN    0x2000000000000000 /* Enable CE Interrupts         */
  236.  
  237. /* Uncorrectable Error AFSR, AFAR holds low 40bits of faulting physical address. */
  238. #define PSYCHO_UEAFSR_PPIO    0x8000000000000000 /* Primary PIO is cause         */
  239. #define PSYCHO_UEAFSR_PDRD    0x4000000000000000 /* Primary DVMA read is cause   */
  240. #define PSYCHO_UEAFSR_PDWR    0x2000000000000000 /* Primary DVMA write is cause  */
  241. #define PSYCHO_UEAFSR_SPIO    0x1000000000000000 /* Secondary PIO is cause       */
  242. #define PSYCHO_UEAFSR_SDRD    0x0800000000000000 /* Secondary DVMA read is cause */
  243. #define PSYCHO_UEAFSR_SDWR    0x0400000000000000 /* Secondary DVMA write is cause*/
  244. #define PSYCHO_UEAFSR_RESV1    0x03ff000000000000 /* Reserved                     */
  245. #define PSYCHO_UEAFSR_BMSK    0x0000ffff00000000 /* Bytemask of failed transfer  */
  246. #define PSYCHO_UEAFSR_DOFF    0x00000000e0000000 /* Doubleword Offset            */
  247. #define PSYCHO_UEAFSR_MID    0x000000001f000000 /* UPA MID causing the fault    */
  248. #define PSYCHO_UEAFSR_BLK    0x0000000000800000 /* Trans was block operation    */
  249. #define PSYCHO_UEAFSR_RESV2    0x00000000007fffff /* Reserved                     */
  250.  
  251. /* Correctable Error AFSR, AFAR holds low 40bits of faulting physical address. */
  252. #define PSYCHO_CEAFSR_PPIO    0x8000000000000000 /* Primary PIO is cause         */
  253. #define PSYCHO_CEAFSR_PDRD    0x4000000000000000 /* Primary DVMA read is cause   */
  254. #define PSYCHO_CEAFSR_PDWR    0x2000000000000000 /* Primary DVMA write is cause  */
  255. #define PSYCHO_CEAFSR_SPIO    0x1000000000000000 /* Secondary PIO is cause       */
  256. #define PSYCHO_CEAFSR_SDRD    0x0800000000000000 /* Secondary DVMA read is cause */
  257. #define PSYCHO_CEAFSR_SDWR    0x0400000000000000 /* Secondary DVMA write is cause*/
  258. #define PSYCHO_CEAFSR_RESV1    0x0300000000000000 /* Reserved                     */
  259. #define PSYCHO_CEAFSR_ESYND    0x00ff000000000000 /* Syndrome Bits                */
  260. #define PSYCHO_UEAFSR_SIZE    0x0000ffff00000000 /* Bytemask of failed transfer  */
  261. #define PSYCHO_CEAFSR_DOFF    0x00000000e0000000 /* Double Offset                */
  262. #define PSYCHO_CEAFSR_MID    0x000000001f000000 /* UPA MID causing the fault    */
  263. #define PSYCHO_CEAFSR_BLK    0x0000000000800000 /* Trans was block operation    */
  264. #define PSYCHO_CEAFSR_RESV2    0x00000000007fffff /* Reserved                     */
  265.  
  266. /* PSYCHO Performance Monitor Register, the counter holds 2 32-bit event counters. */
  267. #define PSYCHO_PMCTRL_RESV3    0xffffffffffff0000 /* Reserved                     */
  268. #define PSYCHO_PMCTRL_CLR1    0x0000000000008000 /* Clear SEL1 counter           */
  269. #define PSYCHO_PMCTRL_RESV2    0x0000000000006000 /* Reserved                     */
  270. #define PSYCHO_PMCTRL_SEL1    0x0000000000001f00 /* Event source 1               */
  271. #define PSYCHO_PMCTRL_CLR0    0x0000000000000080 /* Clear SEL0 counter           */
  272. #define PSYCHO_PMCTRL_RESV1    0x0000000000000060 /* Reserved                     */
  273. #define PSYCHO_PMCTRL_SEL0    0x000000000000001f /* Event source 0               */
  274.  
  275. /* SEL0/SEL1 each can take any one of the following values. */
  276. #define PMCTRL_SEL_NSDRA    0x00  /* # of streaming dvma reads for PCI A       */
  277. #define PMCTRL_SEL_NSDWA    0x01  /* # of streaming dvma writes for PCI A      */
  278. #define PMCTRL_SEL_NCDRA    0x02  /* # of consistent dvma reads for PCI A      */
  279. #define PMCTRL_SEL_NCDWA    0x03  /* # of consistent dvma writes for PCI A     */
  280. #define PMCTRL_SEL_SBMA        0x04  /* # of streaming buffer misses on PCI A     */
  281. #define PMCTRL_SEL_DCGA        0x05  /* # of DVMA granted cycles on PCI A         */
  282. #define PMCTRL_SEL_DWTA        0x06  /* # of DVMA words transferred on PCI A      */
  283. #define PMCTRL_SEL_CPIOA    0x07  /* # of PIO cycles used by PSYCHO on PCI A   */
  284. #define PMCTRL_SEL_NSDRB    0x08  /* # of streaming dvma reads for PCI B       */
  285. #define PMCTRL_SEL_NSDWB    0x09  /* # of streaming dvma writes for PCI B      */
  286. #define PMCTRL_SEL_NCDRB    0x0a  /* # of consistent dvma reads for PCI B      */
  287. #define PMCTRL_SEL_NCDWB    0x0b  /* # of consistent dvma writes for PCI B     */
  288. #define PMCTRL_SEL_SBMB        0x0c  /* # of streaming buffer misses on PCI B     */
  289. #define PMCTRL_SEL_DCGB        0x0d  /* # of DVMA granted cycles on PCI B         */
  290. #define PMCTRL_SEL_DWTB        0x0e  /* # of DVMA words transferred on PCI B      */
  291. #define PMCTRL_SEL_CPIOB    0x0f  /* # of PIO cycles used by PSYCHO on PCI B   */
  292. #define PMCTRL_SEL_TMISS    0x10  /* # of IOMMU TLB misses                     */
  293. #define PMCTRL_SEL_IRQ        0x11  /* # of interrupts                           */
  294. #define PMCTRL_SEL_INACK    0x12  /* # of interrupt NACKs on UPA               */
  295. #define PMCTRL_SEL_PRD        0x13  /* # of PIO reads                            */
  296. #define PMCTRL_SEL_PWR        0x14  /* # of PIO writes                           */
  297. #define PMCTRL_SEL_MBT        0x15  /* # of Merge Buffer transactions            */
  298. #define PMCTRL_SEL_PDRTA    0x16  /* # of PCI A DVMA tablewalk induced retries */
  299. #define PMCTRL_SEL_PDRSA    0x17  /* # of PCI A DVMA str buf induced retries   */
  300. #define PMCTRL_SEL_PDRTB    0x18  /* # of PCI B DVMA tablewalk induced retries */
  301. #define PMCTRL_SEL_PDRSB    0x19  /* # of PCI B DVMA str buf induced retries   */
  302. /* Values 0x1a --> 0x1f are reserved. */
  303.  
  304. /* PSYCHO PCI Control Register */
  305. #define PSYCHO_PCICTRL_RESV1    0xfffffff000000000 /* Reserved                     */
  306. #define PSYCHO_PCICTRL_SBH_ERR    0x0000000800000000 /* Streaming byte hole error    */
  307. #define PSYCHO_PCICTRL_SERR    0x0000000400000000 /* SERR signal asserted         */
  308. #define PSYCHO_PCICTRL_SPEED    0x0000000200000000 /* PCI speed (1 is U2P clock)   */
  309. #define PSYCHO_PCICTRL_RESV2    0x00000001ffc00000 /* Reserved                     */
  310. #define PSYCHO_PCICTRL_ARB_PARK    0x0000000000200000 /* PCI arbitration parking      */
  311. #define PSYCHO_PCICTRL_RESV3    0x00000000001ff800 /* Reserved                     */
  312. #define PSYCHO_PCICTRL_SBH_INT    0x0000000000000400 /* Streaming byte hole int enab */
  313. #define PSYCHO_PCICTRL_WEN    0x0000000000000200 /* Power Mgmt Wake Enable       */
  314. #define PSYCHO_PCICTRL_EEN    0x0000000000000100 /* PCI Error Interrupt Enable   */
  315. #define PSYCHO_PCICTRL_RESV4    0x00000000000000c0 /* Reserved                     */
  316. #define PSYCHO_PCICTRL_AEN    0x000000000000003f /* PCI DVMA Arbitration Enable  */
  317.  
  318. /* PSYCHO PCI AFSR, AFAR holds low 40 bits of physical address causing the fault. */
  319. #define PSYCHO_PCIAFSR_PMA    0x8000000000000000 /* Primary Master Abort Error   */
  320. #define PSYCHO_PCIAFSR_PTA    0x4000000000000000 /* Primary Target Abort Error   */
  321. #define PSYCHO_PCIAFSR_PRTRY    0x2000000000000000 /* Primary Excessive Retries    */
  322. #define PSYCHO_PCIAFSR_PPERR    0x1000000000000000 /* Primary Parity Error         */
  323. #define PSYCHO_PCIAFSR_SMA    0x0800000000000000 /* Secondary Master Abort Error */
  324. #define PSYCHO_PCIAFSR_STA    0x0400000000000000 /* Secondary Target Abort Error */
  325. #define PSYCHO_PCIAFSR_SRTRY    0x0200000000000000 /* Secondary Excessive Retries  */
  326. #define PSYCHO_PCIAFSR_SPERR    0x0100000000000000 /* Secondary Parity Error       */
  327. #define PSYCHO_PCIAFSR_RESV1    0x00ff000000000000 /* Reserved                     */
  328. #define PSYCHO_PCIAFSR_SIZE    0x0000ffff00000000 /* Bytemask of failed transfer  */
  329. #define PSYCHO_PCIAFSR_BLK    0x0000000080000000 /* Trans was block operation    */
  330. #define PSYCHO_PCIAFSR_RESV2    0x0000000040000000 /* Reserved                     */
  331. #define PSYCHO_PCIAFSR_MID    0x000000003e000000 /* MID causing the error        */
  332. #define PSYCHO_PCIAFSR_RESV3    0x0000000001ffffff /* Reserved                     */
  333.  
  334. /* PSYCHO Diagnostic Register. */
  335. #define PSYCHO_PSYDIAG_RESV    0xffffffffffffff80 /* Reserved                     */
  336. #define PSYCHO_PCIDIAG_DRETRY    0x0000000000000040 /* Disable retry limit          */
  337. #define PSYCHO_PCIDIAG_DISYNC    0x0000000000000020 /* Disable DMA wr / irq sync    */
  338. #define PSYCHO_PCIDIAG_DDWSYNC    0x0000000000000010 /* Disable DMA wr / PIO rd sync */
  339. #define PSYCHO_PCIDIAG_IDDPAR    0x0000000000000008 /* Invert DMA data parity       */
  340. #define PSYCHO_PCIDIAG_IPDPAR    0x0000000000000004 /* Invert PIO data parity       */
  341. #define PSYCHO_PCIDIAG_IPAPAR    0x0000000000000002 /* Invert PIO address parity    */
  342. #define PSYCHO_PCIDIAG_LPBACK    0x0000000000000001 /* Enable loopback mode         */
  343.  
  344. /* IOMMU things defined fully in asm-sparc64/iommu.h */
  345.  
  346. /* Streaming Buffer Control Register */
  347. #define PSYCHO_SBUFCTRL_RESV    0xffffffffffffff80 /* Reserved                     */
  348. #define PSYCHO_SBUFCTRL_LRU_LP    0x0000000000000070 /* LRU Lock Pointer             */
  349. #define PSYCHO_SBUFCTRL_LRU_LE    0x0000000000000008 /* LRU Lock Enable              */
  350. #define PSYCHO_SBUFCTRL_RR_DIS    0x0000000000000004 /* Rerun Disable                */
  351. #define PSYCHO_SBUFCTRL_DE    0x0000000000000002 /* Diag Mode Enable             */
  352. #define PSYCHO_SBUFCTRL_SB_EN    0x0000000000000001 /* Streaming Buffer Enable      */
  353.  
  354. /* Streaming Buffer Page Invalidate/Flush Register */
  355. #define PSYCHO_SBUFFLUSH_ADDR    0x00000000ffffe000 /* DVMA Page to be flushed      */
  356. #define PSYCHO_SBUFFLUSH_RESV    0x0000000000001fff /* Ignored bits                 */
  357.  
  358. /* Streaming Buffer Flush Synchronization Register */
  359. #define PSYCHO_SBUFSYNC_ADDR    0x000001ffffffffc0 /* Physical address to update   */
  360. #define PSYCHO_SBUFSYNC_RESV    0x000000000000003f /* Ignored bits                 */
  361.  
  362. /* DMA Scoreboard Diagnostic Register(s) */
  363. #define PSYCHO_DSCORE_VALID    0x8000000000000000 /* Entry is valid               */
  364. #define PSYCHO_DSCORE_C        0x4000000000000000 /* Transaction cacheable        */
  365. #define PSYCHO_DSCORE_READ    0x2000000000000000 /* Transaction was a read       */
  366. #define PSYCHO_DSCORE_TAG    0x1f00000000000000 /* Transaction ID               */
  367. #define PSYCHO_DSCORE_ADDR    0x00fffffffff80000 /* Transaction PADDR            */
  368. #define PSYCHO_DSCORE_BMSK    0x000000000007fff8 /* Bytemask of pending transfer */
  369. #define PSYCHO_DSCORE_SRC    0x0000000000000007 /* Transaction source           */
  370.  
  371. /* PSYCHO Interrupt mapping register(s). */
  372. #define PSYCHO_IMAP_RESV1    0xffffffff00000000 /* Reserved                     */
  373. #define PSYCHO_IMAP_VALID    0x0000000080000000 /* This enables delivery.       */
  374. #define PSYCHO_IMAP_TID        0x000000007c000000 /* Target ID (MID to send it to)*/
  375. #define PSYCHO_IMAP_RESV2    0x0000000003fff800 /* Reserved                */
  376. #define PSYCHO_IMAP_IGN        0x00000000000007c0 /* Interrupt Group Number.       */
  377. #define PSYCHO_IMAP_INO        0x000000000000003f /* Interrupt Number Offset.       */
  378. #define PSYCHO_IMAP_INR        0x00000000000007ff /* Interrupt # (Gfx/UPA_slave)  */
  379.  
  380. /* PSYCHO Interrupt clear pseudo register(s). */
  381. #define PSYCHO_ICLR_RESV1     0xfffffffffffffff0 /* Reserved               */
  382. #define PSYCHO_ICLR_IDLE    0x0000000000000000 /* Transition to idle state.       */
  383. #define PSYCHO_ICLR_TRANSMIT    0x0000000000000001 /* Transition to transmit state */
  384. #define PSYCHO_ICLR_RESV2    0x0000000000000002 /* Reserved.               */
  385. #define PSYCHO_ICLR_PENDING    0x0000000000000003 /* Transition to pending state. */
  386.  
  387. /* PSYCHO Interrupt Retry Timer register. */
  388. #define PSYCHO_IRETRY_LIMIT    0x00000000000fffff /* The retry interval.       */
  389.  
  390. /* PSYCHO Interrupt State registers. XXX fields to be documented later */
  391.  
  392. /* PSYCHO Counter register. XXX fields to be documented later */
  393.  
  394. /* PSYCHO Limit register. XXX fields to be documented later */
  395.  
  396. /* PSYCHO Performance Monitor Control register. XXX fields to be documented later */
  397.  
  398. /* PSYCHO Performance Monitor Counter register. XXX fields to be documented later */
  399.  
  400. #endif /* !(__SPARC64_PSYCHO_H) */
  401.